package com.dldata.display.entity;

import javax.persistence.*;

/**
 * Created by 倪继文 on 2017/5/12.
 */
@Entity
@Table(name = "student")
public class StudentEntity {
    private String id;
    private String sex;
    private String zhiYe;
    private String xueLi;
    private String aiHao;
    private String quanxian;

    @Id
    @Column(name = "id", nullable = false, length = 50)
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "sex", nullable = true, length = 50)
    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    @Basic
    @Column(name = "zhi_ye", nullable = true, length = 50)
    public String getZhiYe() {
        return zhiYe;
    }

    public void setZhiYe(String zhiYe) {
        this.zhiYe = zhiYe;
    }

    @Basic
    @Column(name = "xue_li", nullable = true, length = 50)
    public String getXueLi() {
        return xueLi;
    }

    public void setXueLi(String xueLi) {
        this.xueLi = xueLi;
    }

    @Basic
    @Column(name = "ai_hao", nullable = true, length = 50)
    public String getAiHao() {
        return aiHao;
    }

    public void setAiHao(String aiHao) {
        this.aiHao = aiHao;
    }

    @Basic
    @Column(name = "quanxian", nullable = true, length = 50)
    public String getQuanxian() {
        return quanxian;
    }

    public void setQuanxian(String quanxian) {
        this.quanxian = quanxian;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        StudentEntity that = (StudentEntity) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (sex != null ? !sex.equals(that.sex) : that.sex != null) return false;
        if (zhiYe != null ? !zhiYe.equals(that.zhiYe) : that.zhiYe != null) return false;
        if (xueLi != null ? !xueLi.equals(that.xueLi) : that.xueLi != null) return false;
        if (aiHao != null ? !aiHao.equals(that.aiHao) : that.aiHao != null) return false;
        if (quanxian != null ? !quanxian.equals(that.quanxian) : that.quanxian != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (sex != null ? sex.hashCode() : 0);
        result = 31 * result + (zhiYe != null ? zhiYe.hashCode() : 0);
        result = 31 * result + (xueLi != null ? xueLi.hashCode() : 0);
        result = 31 * result + (aiHao != null ? aiHao.hashCode() : 0);
        result = 31 * result + (quanxian != null ? quanxian.hashCode() : 0);
        return result;
    }
}
